<!--{include file='header.inc.tpl'}-->
<body>
<div id="man_zone">
    <form action="" method="post" name="add_user">
        <input type="hidden" name="validate" value="<!--{$validate}-->" />
        <table width="99%" border="0" align="center" cellpadding="0" cellspacing="1">
            <tr>
                <td width="18%" colspan="2" class="div_title">必填信息</td>
            </tr>
            <tr>
                <td width="18%" class="left_title_2 pr10">用户名</td>
                <td width="82%" class="p5">
                    <input name="user[username]" type="text" maxlength="17" value="" size="10" />
                </td>
            </tr>
            <tr>
                <td width="18%" class="left_title_2 pr10">密码</td>
                <td width="82%" class="p5">
                    <input name="user[password]" type="password" value="" />
                </td>
            </tr>
            <tr>
                <td width="18%" class="left_title_2 pr10">再次输入密码</td>
                <td width="82%" class="p5">
                    <input name="user[password2]" type="password"  value="" />
                </td>
            </tr>
            <tr>
                <td class="left_title_2 pr10">电子邮箱（E-mail）</td>
                <td class="p5">
                    <input name="user[email]" type="text" maxlength="37" value="" size="30" />
                </td>
            </tr>
            <tr>
                <td width="18%" colspan="2" class="div_title">选填信息</td>
            </tr>
            <tr>
                <td class="left_title_2 pr10">真实姓名</td>
                <td class="p5">
                    <input name="user[realname]" type="text" maxlength="17"  value="" />
                </td>
            </tr>
            <tr>
                <td class="left_title_2 pr10">性别</td>
                <td class="p5">
                    <input type="radio" name="user[gender]" value="0"  />男 &nbsp;
                    <input type="radio" name="user[gender]" value="1"  />女
                </td>
            </tr>
            <tr>
                <td class="left_title_2 pr10">出生日期</td>
                <td class="p5">
                    <select id="birthyear" name="user[birthyear]">
                        <!--{section name=customer loop=2011 step=2 start=1901}-->
                        <option value="<!--{$smarty.section.customer.index}-->"><!--{$smarty.section.customer.index}--></option>							<option value="<!--{$smarty.section.customer.index+1}-->"><!--{$smarty.section.customer.index+1}--></option>
                        <!--{/section}-->
                    </select>年
                    <select id="birthmonth" name="user[birthmonth]">
                        <option value="1">1</option><option value="2">2</option>
                        <option value="3">3</option><option value="4">4</option>
                        <option value="5">5</option><option value="6">6</option>
                        <option value="7">7</option><option value="8">8</option>
                        <option value="9">9</option><option value="10">10</option>
                        <option value="11">11</option><option value="12">12</option>
                    </select>月
                    <select id="birthday" name="user[birthday]">
                        <option value="1">1</option><option value="2">2</option>
                        <option value="3">3</option><option value="4">4</option>
                        <option value="5">5</option><option value="6">6</option>
                        <option value="7">7</option><option value="8">8</option>
                        <option value="9">9</option><option value="10">10</option>
                        <option value="11">11</option><option value="12">12</option>
                        <option value="13">13</option><option value="14">14</option>
                        <option value="15">15</option><option value="16">16</option>
                        <option value="17">17</option><option value="18">18</option>
                        <option value="19">19</option><option value="20">20</option>
                        <option value="21">21</option><option value="22">22</option>
                        <option value="23">23</option><option value="24">24</option>
                        <option value="25">25</option><option value="26">26</option>
                        <option value="27">27</option><option value="28">28</option>
                        <option value="29">29</option><option value="30">30</option>
                        <option value="31">31</option>
                    </select>日
                    <input type="hidden" size="10" id="birthpicker" name="birthpicker" />
                    <input type="hidden" size="10" id="constellation" name="user[constellation]" />
                    <input type="hidden" size="10" id="zodiac" name="user[zodiac]" />
                    <div style="display: none;">
                        <img id="calImg" src="<!--{$IMG_DIR}-->calendar.gif" alt="Popup" class="trigger">
                    </div>
                    <script type="text/javascript" language="javascript">
                        function updateSelected(dates) {
                                $('#birthmonth').val(dates.length ? dates[0].getMonth() + 1 : '');
                                $('#birthday').val(dates.length ? dates[0].getDate() : '');
                                $('#birthyear').val(dates.length ? dates[0].getFullYear() : '');
                                setConstellation(dates);
                        }

                        function setConstellation(date){
                                var con = getConstellation(date[0].getMonth()+1 ,date[0].getDate());
                                var zo = getZodiac(date[0].getFullYear());
                                $("#con_zo").html(con+'座 &nbsp;&nbsp;&nbsp;&nbsp;属相：' +zo);
                                $("#constellation").val(con);
                                $("#zodiac").val(zo);
                        }

                        $('#birthpicker').datepick({
                                minDate: '01/01/1901', maxDate: '12/31/2010',
                                yearRange: '1901:2010',
                                defaultDate: '02/09/1983', selectDefaultDate: true,
                                alignment: 'bottomRight', onSelect: updateSelected,
                                showTrigger: '#calImg'});

                        $('#birthmonth,#birthday,#birthyear').change(function() {
                                $('#birthpicker').datepick('setDate', new Date(
                                        $('#birthyear').val(), $('#birthmonth').val() - 1,
                                        $('#birthday').val()));
                        });
                    </script>
                </td>
            </tr>
            <tr>
                <td class="left_title_2 pr10">星座</td>
                <td class="p5" id='con_zo'>
                    <span class="gray">星座和属相将根据生日自动计算</span>
                </td>
            </tr>
            <tr>
                <td class="left_title_2 pr10">所在地</td>
                <td class="p5">
                    <div id="residePlace">

                    </div>
                    <script type="text/javascript">
                            $(function(){
                                $("#residePlace").areaSelector('user[resideprovince]','','user[residecity]','','user[residedist]','');
                            });
                    </script>
                </td>
            </tr>
            <tr>
                <td class="left_title_2 pr10">职业</td>
                <td class="p5">
                    <input name="user[occupation]" type="text" value="" />
                </td>
            </tr>
            <tr>
                <td class="left_title_2 pr10">单位/公司名称</td>
                <td class="p5">
                    <input name="user[company]" type="text" value="" />
                </td>
            </tr>
            <tr>
                <td class="left_title_2 pr10">通讯地址</td>
                <td class="p5">
                    <input id="address" name="user[address]" type="text" value="" size="30" />
                </td>
            </tr>
            <tr class='hide'id="site_close_reason">
                <td class="left_title_2 pr10">邮政编码</td>
                <td class="p5">
                    <input id="zipcode" name="user[zipcode]" type="text" maxlength="8" value="" />
                </td>
            </tr>
            <tr>
                <td class="left_title_2 pr10">联系电话</td>
                <td class="p5">
                    <input id="telephone" name="user[telephone]" type="text" maxlength="20" value="" />
                </td>
            </tr>
            <tr>
                <td class="left_title_2 pr10">QQ</td>
                <td class="p5">
                    <input id="qq" name="user[qq]" type="text" maxlength="12" value="" />
                </td>
            </tr>
            <tr>
                <td class="left_title_2 pr10">MSN</td>
                <td class="p5">
                    <input id="msn" name="user[msn]" type="text" value="" />
                </td>
            </tr>
            <tr>
                <td class="left_title_2 pr10">证件类型</td>
                <td class="p5">
                    <select name="user[idcardtype]" id="idcardtype">
                        <option value="">请选择</option>
                        <!--{section name=idcardtype loop=$idcardtype_options}-->
                        <option value="<!--{$idcardtype_options[idcardtype]}-->"><!--{$idcardtype_options[idcardtype]}--></option>
                        <!--{/section}-->
                    </select>
                </td>
            </tr>
            <tr>
                <td class="left_title_2 pr10">证件号码</td>
                <td class="p5">
                    <input name="user[idcard]" type="text" value="" size="30" />
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center" class="p10">
                    <input type="submit" value="确 定" class="btn">&nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="reset" value="重 置" class="btn"></td>
            </tr>
        </table>
    </form>
</div>
<script type="text/javascript" language="javascript">
    $(function(){
        $("#current_template").val('<!--{$settings.current_template}-->');
        $("input[name='param[site_state]'][value='<!--{$settings.site_state}-->']").attr("checked",true);
        $("input[name='param[footertime]'][value='<!--{$settings.footertime}-->']").attr("checked",true);
        $("input[name='param[debug]'][value='<!--{$settings.debug}-->']").attr("checked",true);
        $("input[name='param[site_state]'][value='0']").click(function(){$("#site_close_reason").show()});
        $("input[name='param[site_state]'][value='1']").click(function(){$("#site_close_reason").hide()});
        $('img[class="help"]').click(function(e) {
                e.preventDefault();
                var content = this.title;
                $.fn.nyroModalManual({
                    bgColor:'',
                    minWidth:40,
                    minHeight:30,
                    content: content
                });
                return false;
        });
    });
</script>
</body>
</html>
